﻿@model IEnumerable<INSE6260.OnlineBanking.Model.Transaction.PaymentHistory>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"> </script>
<script type="text/javascript" language="javascript">
    $(document).ready(function () {
        $('#StartDate').datepicker(({ dateFormat: '@Html.ConvertDateFormat()' }));
        $('#EndDate').datepicker(({ dateFormat:   '@Html.ConvertDateFormat()' }));
    });
</script>
@{
    ViewBag.Title = "Payment History";
}
<div>
    @using (Ajax.BeginForm("ShowHistory", "PaymentHistory", new AjaxOptions
                                                                              {
                                                                                  UpdateTargetId = "HistoryList",
                                                                                  InsertionMode = InsertionMode.Replace,
                                                                                  HttpMethod = "GET"
                                                                              }))
    {
        
        <fieldset>
            <legend>Payment History</legend>
            <div class="editor-label">
                From:
            </div>
            <div class="editor-field">
                @Html.Editor("StartDate")
            </div>
            <div class="editor-label">
                To:
            </div>
            <div class="editor-field">
                @Html.Editor("EndDate")
               
            </div>
            <div class="editor-field">
            <input type="submit" value="Show Payment History" />
            </div>
        </fieldset>
    }
</div>

<div id="HistoryList">
</div>
